

const {M,app}=window;

M.cache_req_data_enable=true;

app.begin((req,res)=>{
     console.log("app.begin",req.url,res.params)
})

//全局方法,列表查询
app.get("/gloable_page_list",async (req,res)=>{
     const {fetchUrl,...queryParams}=req.params;
     let result=await M.request.get(fetchUrl,queryParams)
     res.send({rows:result.data.dataList ,total:result.data.total});
})


app.get("serverMeauList",async (req,res)=>{
     let serverMeauList=await M.request.get1("/menu/serverMeauList")
     res.send(serverMeauList)
})